/* ***********************************************************************
 * Copyright (C) 1992-- 2016 中国南方航空股份有限公司.
 *
 * Created [2016-09-08 15:07:30] by FMS Team
 * ***********************************************************************
 *
 * mybaits-generator
 * ***********************************************************************
 */
package com.foreveross.law.form.domain;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
* <p>com.foreveross.law.form.domain.FieldModel</p>
*
* @author changwu.liao email:changwu.liao(a)gmail.com
* @version 1.0
* @since 1.0
* @Modified by add modified description
* @purpose add this file description here
*/
public class FieldModel implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias	
	public static final String TABLE_SQL_NAME = "FIELD_MODEL";
	
	public static final String ALIAS_FIELD_MODEL_ID = "fieldModelId";
	public static final String ALIAS_FORM_MODEL_ID = "formModelId";
	public static final String ALIAS_FIELD_NAME = "fieldName";
	public static final String ALIAS_FIELD_TYPE = "fieldType";
	public static final String ALIAS_CREATE_DATE = "createDate";
	public static final String ALIAS_CREATE_BY = "createBy";
	
	//the column is a primary key	
	public static final String PROP_KEY = "fieldModelId";
	
	//fields START
	public static String PROP_REF="FieldModel";
	public static String PROP_REF_FIELD_MODEL_ID = "fieldModelId";
	
	public static String PROP_REF_FORM_MODEL_ID = "formModelId";
	
	public static String PROP_REF_FIELD_NAME = "fieldName";
	
	public static String PROP_REF_FIELD_TYPE = "fieldType";
	
	public static String PROP_REF_CREATE_DATE_BEGIN = "createDateBegin";
	public static String PROP_REF_CREATE_DATE_END = "createDateEnd";
	
	public static String PROP_REF_CREATE_BY = "createBy";
	
	//fields END
	
	//columns sql name START	
	public static String PROP_COLUMN_FIELD_MODEL_ID = "FIELD_MODEL_ID";
	public static String PROP_COLUMN_FORM_MODEL_ID = "FORM_MODEL_ID";
	public static String PROP_COLUMN_FIELD_NAME = "FIELD_NAME";
	public static String PROP_COLUMN_FIELD_TYPE = "FIELD_TYPE";
	public static String PROP_COLUMN_CREATE_DATE = "CREATE_DATE";
	public static String PROP_COLUMN_CREATE_BY = "CREATE_BY";
	//columns sql name END
		
	//columns START
	private java.lang.String fieldModelId;
	private java.lang.String formModelId;
	private java.lang.String fieldName;
	private java.lang.String fieldType;
	private java.util.Date createDate;
	private java.lang.String createBy;
	//columns END

	public FieldModel(){
	}

	public FieldModel(
		java.lang.String fieldModelId
	){
		this.fieldModelId = fieldModelId;
	}

	public void setFieldModelId(java.lang.String value) {
		this.fieldModelId = value;
	}
	
	public java.lang.String getFieldModelId() {
		return this.fieldModelId;
	}
	public void setFormModelId(java.lang.String value) {
		this.formModelId = value;
	}
	
	public java.lang.String getFormModelId() {
		return this.formModelId;
	}
	public void setFieldName(java.lang.String value) {
		this.fieldName = value;
	}
	
	public java.lang.String getFieldName() {
		return this.fieldName;
	}
	public void setFieldType(java.lang.String value) {
		this.fieldType = value;
	}
	
	public java.lang.String getFieldType() {
		return this.fieldType;
	}
	
	public void setCreateDate(java.util.Date value) {
		this.createDate = value;
	}
	
	public java.util.Date getCreateDate() {
		return this.createDate;
	}
	public void setCreateBy(java.lang.String value) {
		this.createBy = value;
	}
	
	public java.lang.String getCreateBy() {
		return this.createBy;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("FieldModelId",getFieldModelId())
			.append("FormModelId",getFormModelId())
			.append("FieldName",getFieldName())
			.append("FieldType",getFieldType())
			.append("CreateDate",getCreateDate())
			.append("CreateBy",getCreateBy())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getFieldModelId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof FieldModel == false) return false;
		if(this == obj) return true;
		FieldModel other = (FieldModel)obj;
		return new EqualsBuilder()
			.append(getFieldModelId(),other.getFieldModelId())
			.isEquals();
	}
}

